package models

import (
	"time"
)

type Admins struct {
	Id              int       `xorm:"not null pk autoincr INT(10)"`
	Name            string    `xorm:"not null comment('管理员用户') unique VARCHAR(20)"`
	Email           string    `xorm:"not null comment('管理员邮箱') unique VARCHAR(100)"`
	Password        string    `xorm:"not null comment('管理员密码') VARCHAR(100)"`
	Avatar          string    `xorm:"default 'NULL' comment('头像') VARCHAR(191)"`
	LoginIp         string    `xorm:"not null default ''127.0.0.1'' comment('登录ip') VARCHAR(20)"`
	LoginCount      int       `xorm:"not null default 0 comment('登录次数') INT(11)"`
	Nickname        string    `xorm:"default 'NULL' comment('昵称') VARCHAR(20)"`
	Sex             int       `xorm:"not null default 1 comment('性别，1男，0女') TINYINT(1)"`
	SuperAdmin      int       `xorm:"not null default 0 comment('网站创始人,1是，0否') TINYINT(1)"`
	Qq              string    `xorm:"default 'NULL' comment('qq') VARCHAR(20)"`
	RoleId          int       `xorm:"not null default 0 comment('管理员身份id') INT(11)"`
	Phone           string    `xorm:"default 'NULL' comment('电话') VARCHAR(20)"`
	Status          int       `xorm:"not null default 1 comment('状态1启用，0禁用') TINYINT(1)"`
	RememberToken   string    `xorm:"default 'NULL' VARCHAR(100)"`
	ExpiresDatetime time.Time `xorm:"default 'NULL' comment('过期时间') TIMESTAMP"`
	CreatedAt       time.Time `xorm:"default 'current_timestamp()' TIMESTAMP"`
	UpdatedAt       time.Time `xorm:"default 'current_timestamp()' TIMESTAMP"`
}
